package com.endava.exceptions.propagation;

/**
 * Example of handling uncheked exception propagation.
 * The compiler does not impose to declare or handle it.
 * The error will propagate and be thrown.
 * 
 * @author Andreea
 *
 */
public class TextExRuntimeException {
	
	static void doStuff() {
		int x = 5 / 0; // Can't divide by zero!
		// ArithmeticException is thrown here but the compiler does not need to declare or handle it
	}
	
	static void badMethod() {
		doStuff();
	}
	
	public static void main(String[] args) {
		badMethod();
	}
}